<?php


namespace app\admin\controller\general;


use app\admin\controller\Controller;
use app\admin\model\BaseSetting;

class Large extends Controller
{

    /**
     * 代理商列表
     * @return mixed
     * @throws \think\exception\DbException
     */
    public function index()
    {
        $model = BaseSetting::detail('largepay');
        if (!$this->request->isAjax()) {
            return $this->fetch('index', compact('model'));
        }

        if ($model->edit('largepay',$this->postData('large'))) {
            return $this->renderSuccess('更新成功');
        }
        return $this->renderError($model->getError() ?: '更新失败');
    }

}